package com.mnsq.common.bean.entity.book;

import com.mnsq.common.bean.entity.CommonEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 已看书籍
 *
 * @author Administrator
 * @date 2019/1/20 0020
 */
@Data
@Accessors(chain = true)
@Entity
@Table(name = "users_book")
public class UsersBook extends CommonEntity {
    private static final long serialVersionUID = -8066804562020184552L;
    @Column(name = "user_id", columnDefinition = "bigint(19) not null comment '用户id'")
    private Long userId;
    @Column(name = "book_id", columnDefinition = "bigint(19) not null comment '书籍id'")
    private Long bookId;
    @Column(name = "score", columnDefinition = "decimal(4,2) not null default 0.00 comment '评分'")
    private BigDecimal score;
    @Column(name = "comment", columnDefinition = "text comment '评价内容'")
    private String comment;
}
